package com.ating.demo.Mapper;

import com.ating.demo.Entity.Admin;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMapper {

    List<Admin> selectAll(Admin admin);

    Admin selectById(Integer id);

    void insert(Admin admin);

    void updateById(Admin admin);

    @Select("SELECT * FROM admin where username = #{username}")
    Admin selectByUsername(String username);

    @Delete("delete from admin where id = #{id}")
    void moveById(Integer id);
}
